home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
olrdrs
/
bwdev201.zip
/
BLUEWAVE.H
next >
Wrap
C/C++ Source or Header
|
1994-01-18
|
60KB
|
1,025 lines
/*****************************************************************************/
/* */
/* The Blue Wave Offline Mail System Packet Structures */
/* Copyright 1990-1994 by George Hatchew and Cutting Edge Computing */
/* All rights reserved - FidoNet 1:2240/176 */
/* */
/* Last Updated - January 18, 1994 */
/* */
/* --------------------------------------------------------- */
/* DISTRIBUTION OF THIS FILE IS LIMITED BY THE TERMS */
/* SPECIFIED IN THE BLUE WAVE STRUCTURE DOCUMENTATION! */
/* --------------------------------------------------------- */
/* */
/* These data structures should be usable with any C compiler that */
/* supports the ANSI standard for the C language (i.e. ANSI C). They are */
/* NOT guaranteed to be usable with older compilers, which largely relied */
/* on the definition of the language as specified in _The C Programming */
/* Language (1st Edition)_ by Brian Kernighan & Dennis Ritchie. */
/* */
/*****************************************************************************/
#ifndef __BLUEWAVE_H /* An extra safeguard to prevent this header from */
#define __BLUEWAVE_H /* being included twice in the same source file */
#define PACKET_LEVEL 2 /* The current mail packet revision level, */
/* used in the "ver" field of the *.INF */
/* file header. */
/*
** This header defines the data structures for the following files in the
** official Blue Wave offline mail specification:
**
** Door: *.INF BBS and message area information
** *.MIX Quick index to *.FTI records
** *.FTI Information for all packet messages
** *.DAT Packet message text
**
** Reader: *.NET NetMail reply message information
** *.UPI Information for all other reply messages
** *.UPL Reply message information (* NEW *)
** (designed to replace the NET/UPI combo,
** which will soon be obsolete)
** *.REQ List of files to download from BBS
** *.PDQ Offline door configuration information
**
** Misc: *.MSG Fido-style message header
** (used *only* in the *.NET structure, and
** will soon be obsolete)
** *.XTI Extended message packet information
** (not an official part of the Blue Wave
** packet specification; is used by the Blue
** Wave reader only)
**
** The door files (plus individual files for BBS bulletins) comprise a Blue
** Wave message packet, and the reader files (plus individual files for each
** message) comprise a Blue Wave reply packet.
**
** In order to cover ALL BASES, and to be able to say that you were warned,
** *ALL* unused fields should be set to ASCII NUL (0). Any future
** implementation of reserved fields will rely on the premise that the field
** will be 0 if not implemented! The same warning follows for BITMAPPED
** fields. If a bit is not implemented or is not used, TURN IT OFF (0).
** (Clearing an entire structure can be easily accomplished via the memset()
** function. Example: "memset(&ftirec, 0, sizeof(FTI_REC))".)
*/
/*****************************************************************************/
/* >>>>>>>>>>>>>>>>>>>>>>> DATA TYPE DEFINITIONS <<<<<<<<<<<<<<<<<<<<<<<<< */
/*****************************************************************************/
/*
** The data type definitions below help make these structures a little more
** universal between environments. The 8-bit, 16-bit, and 32-bit data types
** defined below can be used as-is with virtually all MS-DOS and OS/2 C/C++
** compilers, but can be changed if necessary should your compiler define
** data types in a different fashion. (Note that the tCHAR and tINT types
** are currently not used; they are included simply for completeness.)
**
** If you are programming for a system that employs a CPU which stores multi-
** byte integers in a manner other than in Intel format (LSB-MSB, or "little
** endian"), simply #define BIG_ENDIAN before #including this header. As
** shown below, this will define the data types as arrays of bytes; the
** drawback is that *YOU* will have to write functions to convert the data,
** since the Blue Wave packet specification requires the data to be in Intel-
** style little-endian format.
**
** IMPORTANT NOTE ABOUT COMPILERS AND STRUCTURES:
** All structures *must* be "packed" (i.e., the compiler MUST NOT insert
** padding bytes between structure elements in order to force elements onto
** word boundaries). The Blue Wave products expect them to be packed; if
** they aren't, you're bound to get some *very* interesting results.
*/
#ifdef BIG_ENDIAN
typedef signed char tCHAR; /* 8 bit signed values */
typedef unsigned char tBYTE; /* 8 bit unsigned values */
typedef unsigned char tINT[2]; /* little-endian 16 bit signed */
typedef unsigned char tWORD[2]; /* little-endian 16 bit unsigned */
typedef unsigned char tLONG[4]; /* little-endian 32 bit signed */
typedef unsigned char tDWORD[4]; /* little-endian 32 bit unsigned */
#else
typedef signed char tCHAR; /* 8 bit signed values */
typedef unsigned char tBYTE; /* 8 bit unsigned values */
typedef signed short tINT; /* 16 bit signed values */
typedef unsigned short tWORD; /* 16 bit unsigned values */
typedef signed long tLONG; /* 32 bit signed values */
typedef unsigned long tDWORD; /* 32 bit unsigned values */
#endif
/*****************************************************************************/
/* >>>>>>>>>>>>>>>>>>>>> DOOR DATA FILE STRUCTURES <<<<<<<<<<<<<<<<<<<<<<< */
/*****************************************************************************/
/*
** Name of file: *.INF
**
** Description: The *.INF file is the source of information for just about
** everything from the host BBS, as well as definitions for
** all of the message areas that are available to the user
** and their status (Local, EchoMail, NetMail, Read Only,
** etc.).
**
** File format: INF_HEADER { only included one time! }
** INF_AREA_INFO { repeated for as many msg bases }
** INF_AREA_INFO { as are available to the user }
** ...
*/
/* Bit-masks for INF_HEADER.UFLAGS field */
#define INF_HOTKEYS 0x0001 /* User uses "hotkeys" in door prompts */
#define INF_XPERT 0x0002 /* Short menus displayed in door */
#define INF_RES1 0x0004 /* RESERVED -- DO NOT USE! */
#define INF_GRAPHICS 0x0008 /* Enable ANSI control sequences in door */
#define INF_NOT_MY_MAIL 0x0010 /* Do not bundle mail from user */
/* Bit-masks for INF_HEADER.NETMAIL_FLAGS field */
#define INF_CAN_CRASH 0x0002 /* Allow Crash status */
#define INF_CAN_ATTACH 0x0010 /* Allow File Attach messages */
#define INF_CAN_KSENT 0x0080 /* Allow Kill/Sent status */
#define INF_CAN_H